/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package renderers;

import java.awt.Component;
import javax.swing.JTable;
import javax.swing.table.DefaultTableCellRenderer;
import model.UserRole;
import model.Module;

/**
 *
 * @author admin
 */
public class TableCellModulesRenderer extends DefaultTableCellRenderer
{
  private static final long serialVersionUID = 1L;

    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus,int row,int col)
    {

        Component c = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, col);

        Module mmm = (Module) table.getModel().getValueAt(row, col);
        if(mmm!=null)
          {
             setText(mmm.getDescription());
          }
        return this;
    }  
}

